/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package clases;

import java.util.Random;

/**
 *
 * @author pato
 */
public class CodigoRandom {
    private static Random rand = new Random();
    private static String codigo;

    public static String getCodigo(int largoDeCodigo) {
        codigo = "";
        int r;
        for (int i = 0; i < largoDeCodigo; i++) {
            do{
                r = rand.nextInt(90);
            }while(r < 65);
            codigo += (char)r;
        }
        return codigo;
    }
}
